using Vin.Tool.Attributes;

namespace Vin.Extension.Framework.Signals.Options;

[Option("VinSignals")]
public class SignalsOption
{
    /// <summary>
    /// 缓存Key
    /// </summary>
    public string? CacheKey { get; set; } = "Vin:Signal:";

    /// <summary>
    /// 信号缓存，路由配置
    /// </summary>
    public List<SignalsRouteOption> Routes { get; set; } = new();
}

[Option("VinSignals:Routes")]
public class SignalsRouteOption
{
    /// <summary>
    /// 服务Key
    /// </summary>
    public string? ServiceKey { get; set; } = "NumberSignal";

    /// <summary>
    /// 路由地址
    /// </summary>
    public string? Route { get; set; }

    /// <summary>
    /// 请求方法
    /// </summary>
    public string? Method { get; set; } = "POST";

    /// <summary>
    /// 过期秒数
    /// </summary>
    public int ExpireSecond { get; set; } = 180;

    /// <summary>
    /// 缓存前缀
    /// </summary>
    public string? Prefix { get; set; } = "";
}